A variety of automation tools exist today for driving the graphical user interfaces of software products. These automation tools automatically supply a series of user inputs that simulate the actions that a human user might take to accomplish a prescribed task when using the software product. One application of these automation tools is in the field of software testing. A software developer can design an automation tool to perform a series of operations involving the graphical user interface of a software product in order to determine whether the software product contains errors, or whether the software product meets predetermined usability requirements.
While a human user can interact with the graphical user interface in a simple and intuitive manner, the automated tools cannot “see” the graphical user interface and thus must expressly rely on program statements to simulate a user's interaction. Providing an adequate collection of program instructions to mimic the user's interaction is a challenging task. This difficulty is partly due to the fact that the program instructions must simulate a vast number of ways that a human user can interact with the graphical user interface. For instance, the graphical user interface presents a large number of user interface objects for the human user to select from, and the user can manipulate these graphical objects in many different ways. Further, different machines may respond to the user's commands in different ways that may be difficult to precisely predict. For instance, there is typically a time lag between a user's command to activate a user interface object and the actual activation (or “firing”) of this user interface object. A testing script should therefore provide some mechanism for accounting for this time lag if it is to reliably simulate interaction between the human user and the user's computer.
Some testing programs and automation tools attempt to address the above complexity by providing various simplifying assumptions. This design approach has several shortcomings. For instance, programmers may resort to a generous use of simple timing mechanisms such as “sleeps” to handle synchronization issues. That is, a programmer my add a fixed delay period (i.e., a “sleep”) after a command to launch a user interface object, where the delay period is selected to be large enough to account for the processing speeds of different machines. This strategy, however, may result in an inefficient test script because these sleeps will be unnecessarily long for many machines, and potentially too short in other unforeseen circumstances. Other attempts to simplify the testing program may resort to the use of a relatively rigid collection of program statements that programmers must adhere to in their scripts. This strict programming framework might be viewed unfavorably by programmers/testers or automation script authors, as it prevents these individuals from implementing different kinds of script writing strategies to suit their individual styles and preferences.
On the other hand, a tool that attempts to duplicate the full richness in interfacing possibilities presented to the human user is in danger of becoming too complex, and thus difficult to use (that is, not user-friendly).
The above problems are compounded by the fact that software products that provide a graphical user interface were not typically designed to handle the kind of “back access” interfacing required by automated testing tools. (That is, the graphical user interfaces of software products were designed with the understanding that users would access interface objects in normal fashion via the keyboard and mouse, not via program simulation). Because of this factor, it may be a complex matter to determine how to glean effective information from the application being tested.
Accordingly, while there are a variety of tools in the market today for automating the graphical user interface associated with software products, there is a general need in the art to provide an automation technique that is versatile, effective, but yet relatively easy to use.